<template>
  <div>
    <ul>
      <!-- v-for循环创建元素谁循环放在谁身上 -->
      <!-- 语法v-for="(item,index) in 遍历对象"：key -->
      <li v-for="(item,index) in arr" :key="index">{{index}}-{{item}}</li>
    </ul>
    <ul>
      <li v-for="(item,index) in obj" :key="index">
        姓名:{{item.name}}
        年龄:{{item.age}}
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name: 'CodeApp',

  data() {
    return {
      arr:[23,24,25,26,27,28,29,30,],
      obj: [
        {name:'张三',age:12},
        {name:'张三丰',age:13},
        {name:'朱正奇',age:16},
        {name:'王五',age:21},
        {name:'李四',age:15},

      ]
    };
  },

  mounted() {
    
  },

  methods: {
    
  },
};
</script>

<style lang="scss" scoped>

</style>